//
//  YJGifEmotionModel.m
//  YJB
//
//  Created by YJB on 2017/1/21.
//  Copyright © 2017年 YJB. All rights reserved.
//

#import "YJGifEmotionModel.h"

@implementation YJGifEmotionModel
-(instancetype)initWithDict:(NSDictionary *)dict
{
    self = [super init];
    if (self)
    {
        self.png = dict[@"png"];
        self.gifUrl = dict[@"gifUrl"];
        self.ID = [NSString stringWithFormat:@"%@",dict[@"id"]];
        if (dict[@"isDownload"])
          self.isDownload = [dict[@"isDownload"] boolValue];
        else
          self.isDownload = NO;
        
    }
    return self;
}

+(instancetype)gifEmotionWithDict:(NSDictionary *)dict
{
    return [[self alloc]initWithDict:dict];
}

+(NSMutableArray *)gifEmotionsWith:(NSArray *)array
{
    NSMutableArray *arrayM = [[NSMutableArray alloc]init];
    for (NSDictionary *dict in array)
    {
        [arrayM addObject:[self gifEmotionWithDict:dict]];
    }
    return arrayM;
}
@end
